package cn.lhf.myblog.db.repository;

import cn.lhf.myblog.db.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;

public interface UserRepository extends JpaRepository<User, Integer> {
    boolean existsUserByEmail(String email);
    boolean existsUserByUsername(String username);

    User findUserById(int id);
    User findUserByUsername(String username);
    User findUserByEmail(String email);
    User findUserByIdAndPassword(int id, String password);
    User findUserByUsernameAndPassword(String username, String password);
    User findUserByEmailAndPassword(String email, String password);
}
